package j.framework.core;

/**
 * User: jason
 * Date: 2014/11/7 10:29
 */
public class Action {
    private String actionId;
    private String name;//操作名称
    private boolean isPublic = false;//是否为公开操作，即不验证权限
    /**
     * 两种显示方式，置灰与隐藏
     */

    public String getActionId() {
        return actionId;
    }

    public void setActionId(String actionId) {
        this.actionId = actionId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isPublic() {
        return isPublic;
    }

    public void setPublic(boolean aPublic) {
        isPublic = aPublic;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Action action = (Action) o;

        if (actionId != null ? !actionId.equals(action.actionId) : action.actionId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return actionId != null ? actionId.hashCode() : 0;
    }
}
